<template>
    <div class="history">
        <span v-for="item in $store.state.searchmusic" @click="find(item)" >{{item}}</span>
        <div class="clear"></div>
    </div>
</template>

<script>
export default {
  methods:{
    find:function (item){
      this.$store.state.play=false;
      this.$store.state.searchShow=false;
      this.$store.dispatch("findmusic",item);
    }
  }
}
</script>

<style lang="Sass">
    .history{width: 100%; padding-bottom: 10px;

      span{padding: 5px 10px; display: block; float: left; background: #26a2ff; color: #fff; font-size: 18px; border-radius: 10px; margin-left: 10px; margin-top: 10px;}
    }
</style>